package com.xdf.ecommerce.controller;

import com.xdf.ecommerce.goods.DeductGoodsInventory;
import com.xdf.ecommerce.goods.GoodsInfo;
import com.xdf.ecommerce.service.IGoodsService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author chanchaw
 * @create 2025-11-11 22:16
 */
@CrossOrigin
@RestController
@RequestMapping("/goods")
@RequiredArgsConstructor
public class GoodsController {
    private final IGoodsService service;
    @PostMapping("/getGoodsInfo8Id")
    public List<GoodsInfo> getGoodsInfo8Id(@RequestBody List<Long> ids){
        return service.getGoodsInfo8Id(ids);
    }
    @PostMapping("/deductGoodsInventory")
    public Boolean deductGoodsInventory(List<DeductGoodsInventory> deductGoodsInventoryList){
        return service.deductGoodsInventory(deductGoodsInventoryList);
    }
}
